/**
 * 
 */
package com.liyue.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.liyue.service.UserService;

/**
 * @author liyue
 *
 */
@Scope("prototype")
@Controller
public class UserAction extends BaseAction{

	private static final long serialVersionUID = 8020891300736982068L;
	
	@Autowired
	private UserService user;
	
	public String findAllUsers(){
//		for (User u : user.findAll()) {
//			System.out.println(u.getId());
//		}
		request.setAttribute("users", user.findAll());
		return SUCCESS;
	}
}
